package org.jeecg.weixin.cp.bean.messagebuilder;

import org.jeecg.weixin.common.api.WxConsts;
import org.jeecg.weixin.cp.bean.message.WxCpMessage;

/**
 * 文本消息builder
 * 
 * <pre>
 * 用法: WxCustomMessage m = WxCustomMessage.TEXT().content(...).toUser(...).build();
 * </pre>
 *
 * @author Daniel Qian
 */
public final class TextBuilder extends BaseBuilder<TextBuilder> {
	private String content;

	public TextBuilder() {
		this.msgType = WxConsts.KefuMsgType.TEXT;
	}

	public TextBuilder content(String content) {
		this.content = content;
		return this;
	}

	@Override
	public WxCpMessage build() {
		WxCpMessage m = super.build();
		m.setContent(this.content);
		return m;
	}
}
